package com.BraveY.Demo10;

import java.util.TreeSet;

public class Demo02 {
    public static void main(String[] args) {
        TreeSet<Student> ts = new TreeSet<>();
        Student stu1 = new Student(1, "胖鸡", 18, "男");
        Student stu2 = new Student(3, "胖鸡2", 18, "男");
        Student stu3 = new Student(2, "胖鸡1", 17, "男");
        Student stu4 = new Student(2, "胖鸡2", 17, "女");
        ts.add(stu1);
        ts.add(stu2);
        ts.add(stu3);
        ts.add(stu4);
        for (Student student : ts) {
            System.out.println(student);
        }
    }
}
